home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Glitch Apple Disk Collection
/
2014.glitch.apple.collection.zip
/
indexed
/
IFRSIM.DSK
/
LOST IN LA.bas
< prev
next >
Wrap
BASIC Source File
|
2014-09-09
|
4KB
|
141 lines
5 REM COPYRIGHT 1982
6 REM BY VERNON BROWN AND
7 REM PROGRAMAMERS SOFTWARE
9 REM
10 REM ***********************
11 REM * LOST IN LOS ANGELES *
12 REM * FROM SEED *
13 REM * *
14 REM * USED TO CREATE NEW *
15 REM * IFR SITUATIONS FOR *
16 REM * PROGRAMMERS FLIGHT *
17 REM * SIMULATOR *
18 REM ***********************
19 REM
20 S = 100:S1 = 0:UP = 24579
70 ST = 24576:O1 = ST +56:O2 = ST +58:I1 = ST +60:I2 = ST +61:MA = ST +12:X1 = ST +26:Y1 = ST +28:AL = ST +87
120 SH = ST +09:PL = ST +06:LI = ST +15:XY = ST +18:DF = ST +39:CH = ST +93:WS = ST +42:WW = ST +43:WN = ST +44:WE = ST +45
170 REM
220 REM PX = PICTURE OFFSET XL = POINTER TABLE LOW BYTE XH = POINTER TABLE HIBYTE XX = DOIT FLAG
270 REM
320 PX = 27388:XL = 27389:XH = 27390:XX = 27391: POKE PX,00: POKE XL,00: POKE XH,72: POKE XX,00
370 REM
420 REM
470 XC = 150:YC = 66:XF = 97:YF = 38:TX = 70:TY = 47
520 TEXT : GOSUB 5570
570 MT = 15:GAS = 0:MI = 0:SE = 0:S1 = 0
620 REM
670 REM SET UP WIND DRIFT
720 REM
770 POKE WN,0: POKE WE,0: POKE WS,0: POKE WW,0
820 A% = RND(1) *4:B% = RND(1) *50
870 ON A% GOTO 920,970,1020,1070
920 POKE WN,B%: GOTO 1120
970 POKE WE,B%: GOTO 1120
1020 POKE WS,B%: GOTO 1120
1070 POKE WW,B%: GOTO 1120
1120 CALL ST
1170 POKE O1,32: POKE O2,32: POKE I1,48: POKE I2,48
1220 REM
1270 REM
1320 REM OMNI MESSAGE AND
1370 REM STARTING X Y CORD
1420 REM
1470 VTAB 22: REM OMNI MESSAGE
1520 POKE X1, RND(1) *150 +50: POKE Y1, RND(1) *100 +30
1570 REM
1620 REM STARTING ALTITUDE
1670 REM
1720 POKE AL,16: POKE AL -3,32:MA% = 2
1770 REM
1820 REM
1870 CALL UP
1920 S1 = S1 +1: IF S1 >S THEN 2170
1970 GOTO 1870
2020 REM
2070 REM UPDATE THE CLOCK
2120 REM
2170 S1 = 0:SE = SE +1: IF SE <60 THEN 2320
2220 SE = 0:MI = MI +1:GA = GA +1: IF GA = MT THEN 4870
2270 CALL UP
2320 HTAB 1: VTAB 24: PRINT HO;":";MI;":";SE;" ";: CALL UP
2370 REM
2420 REM MOVE THE PICTURE
2470 REM
2520 REM
2570 REM DO THE ADF AND OMNI
2620 REM
2670 X = PEEK(X1):Y = PEEK(Y1)
2720 IX = XF -X:IY = YF -Y:DY = YC -Y -X/4:DX = XC -X +Y/2
2770 MV% = (TY -Y) *4: IF MV% < -20 OR MV% >20 THEN MV% = 40
2820 IF MV% <0 THEN MV% = 80 +MV%
2870 IF TX -X < -5 OR TX -X >10 THEN MV% = 40
2920 REM
2970 REM DO THE ADF
3020 REM
3070 CALL UP
3120 IF IX = 0 THEN 3220
3170 IT = IY/IX
3220 T1 = ATN(IT)
3270 T1% = 16 -10 *T1
3320 IF X >XF THEN PF% = (176 -T1%) - PEEK(CH)
3370 IF X <XF THEN PF% = (208 -T1%) - PEEK(CH)
3420 IF PF% >64 THEN PF% = PF% -64: GOTO 3420
3470 POKE DF,PF%
3520 REM
3570 REM DO THE OMNI
3620 REM
3670 CALL UP
3720 IF DY < -5 THEN DY = -6
3770 IF DY >5 THEN DY = 6
3820 IF DX < -5 THEN DX = -6
3870 IF DX >5 THEN DX = 6
3920 IF DI >5 THEN DI = 6
3970 IF DI < -5 THEN DI = -6
4020 POKE O1,32 -DX: POKE I1,48
4070 POKE O2,32 +DY
4120 REM
4170 REM DO THE GLIDE SLOPE
4220 REM
4270 CALL UP
4320 IF PEEK(ALT) <MA% THEN 4870
4370 SL = X -66:DI = PEEK(ALT) *2 -SL
4420 IF DI >5 THEN DI = 6
4470 IF DI < -5 THEN DI = -6
4520 IF SL >40 THEN 4670
4570 IF SL < -10 THEN 4670
4620 POKE I2,48 -DI
4670 IF PEEK(AL) >MA% THEN 1870
4720 REM
4770 REM DO THE AIRPORT
4820 REM
4870 POKE PX,MV%: POKE XX,00: CALL UP: POKE XX,01: FOR I = 1 TO 391: CALL UP: NEXT : PRINT "PUSH ANY KEY TO CONTINUE"
4880 POKE XX,00
4920 GET A$
4970 REM FIRST THE FLIGHT PATH
5020 HGR : HCOLOR= 3: CALL 24588
5030 HPLOT 50,50
5031 HPLOT TO 60,47
5032 HPLOT 48,53
5033 HPLOT TO 60,50
5034 HPLOT 55,60
5035 HPLOT TO 67,57
5036 HPLOT 55,63
5037 HPLOT TO 67,60
5070 REM
5120 REM THEN THE NAV TRACK
5170 REM
5180 FOR X = 68 TO 170:Y = 66 -X/4: HPLOT X,Y: NEXT
5190 FOR Y = 20 TO 150:X = 150 +Y/2: HPLOT X,Y: NEXT
5200 X = 97:Y = 38: FOR I = 1 TO 30: HPLOT X + RND(1) *5,Y + RND(1) *5: NEXT
5270 HOME : VTAB 23: PRINT "PUSH RETURN TO FLY THIS AGAIN": PRINT "ANY OTHER KEY WILL GO BACK TO MENU": GET A$
5320 IF ASC(A$) = 13 THEN 520
5370 PRINT CHR$(4)
5420 PRINT CHR$(4);"RUN MENU"
5470 END
5520 REM
5570 TEXT : HOME : PRINT "YOU ARE CLEARED FOR THE LOS ANGELES"
5571 PRINT : PRINT "APPROACH TO RUNWAY 24L. YOUR ETA IS"
5572 PRINT : PRINT "UP. FIND THE AIRPORT AND LAND"
5573 PRINT : PRINT "GOOD LUCK"
5620 PRINT : PRINT "HIT ANY KEY WHEN READY TO FLY": GET A$: HOME : RETURN